<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <h1>欢迎登录</h1>
    <div id="email"></div></br>
    <input type="button" value="获取登录INFO(测试sentinel流量控制)" onclick="loginInfo()"/></br>

<script type="text/javascript" src="../js/jquery-3.4.1.min.js"></script>
<script type="text/javascript">

    $(function () {
        loginInfo();
    })

function loginInfo() {
    var url = "http://127.0.0.1:9002/user/info";

    $.ajax({
        url: url,
        type: 'post',
        async:false,
        dataType : "text",
        data:{

        },
        timeout:5000,
        success:function (data) {
            var email=data;
            $("#email").text(email);
        },
        error:function(xhr,state,errorThrown){
            alert(xhr.responseText);
        }
    })
}

</script>

</body>
</html>